<?php

namespace app\common\model;

use think\model\concern\SoftDelete;

class PushLog extends \think\Model
{
    use SoftDelete;

    protected $table = 'db_push_log';

    protected $jsonAssoc = true;

    protected $autoWriteTimestamp = true;

    protected $schema = [
        'id' => 'int',
        'create_time' => 'int',
        'update_time' => 'int',
        'delete_time' => 'int',
        'pubid' => 'varchar',
        'sort' => 'int',
        'member_id' => 'int',
        'article_id' => 'int',
        'push_plan_id' => 'int',
        'state' => 'int',
        'site_id' => 'int',
        'site_catid' => 'int',
        'remarks' => 'varchar',
    ];

    public $getters = [
        
    ];

    /**
     * 关联模型member
     */
    public function member()
    {
        return $this->belongsTo(Member::class );
    }

    /**
     * 关联模型article
     */
    public function article()
    {
        return $this->belongsTo(Article::class );
    }

    /**
     * 关联模型pushPlan
     */
    public function pushPlan()
    {
        return $this->belongsTo(PushPlan::class );
    }

    /**
     * 关联模型site
     */
    public function site()
    {
        return $this->belongsTo(Site::class );
    }
}
